import request from '@/utils/request';

// 城市版列表
export const getCitysGross = data => request({
  url: '/api/gross/getCitys',
  method: 'post',
  data: data
});
//  单品版列表
export const getSingleGross = data => request({
  url: '/api/gross/getCommoditys',
  method: 'post',
  data: data
});
//  获取门店数据
export const getStoresGross = data => request({
  url: '/api/gross/getStores',
  method: 'post',
  data: data
});
//  导出报表
export const exportGrossFile = data => request({
  url: '/api/gross/export',
  method: 'post',
  data: data,
  responseType: 'blob'
});
//  导出底表触发
export const exportGrossEndFile = data => request({
  url: '/api/gross/exportEndExport',
  method: 'post',
  data: data
});
//  导入黑名单
export const importBlackList = (data, fun) => request({
  url: '/api/gross/blacklist',
  method: 'post',
  data: data,
  onUploadProgress: fun
});
//  确认导入
export const confirmBlackList = data => request({
  url: '/api/gross/confirmBacklist',
  method: 'post',
  data: data
});
//  下载黑名单模板
export const downloadBlackListTemplate = () => request({
  url: '/api/gross/download',
  method: 'get',
  responseType: 'blob'
});
//  下载已有黑名单
export const exportBlackList = () => request({
  url: '/api/gross/exportBlackList',
  method: 'post',
  responseType: 'blob'
});
//  下载异常黑名单数据
export const exportErrorData = () => request({
  url: '/api/gross/exportErrorData',
  method: 'get',
  responseType: 'blob'
});
//  异常黑名单数据列表
export const listErrorData = data => request({
  url: '/api/gross/listErrorData',
  method: 'post',
  data
});
